//
//  Study1.m
//  test-ios
//
//  Created by wyz5204 on 2023/2/11.
//

#import "Study1.h"

@implementation testObject{
    
}
-(void)seyHello{
    NSLog(@"seyHello-from Objective-C");
    [self main] ;
}

-(void)main{
    NSLog(@"\n---------------------main start---------------------\n");
    [self test : 1 andPar : 2];
    [self test_block: 2 : 3] ;
    NSLog(@"\n---------------------main  end ---------------------\n");
}

-(void)test: (int) p1 andPar: (int) p2{
    NSLog(@"\n>>>>-----------------test start---------------------\n");
    Person* person = [Person new];
    NSLog(@" 1 %@", [NSString stringWithFormat: @"person %@" , person]) ;
    Person* staticMethod = [Person createPerson];
    NSLog(@" 2 %@", staticMethod->_name) ;
    Person* initByName = [[Person alloc] initWithName: @"adad"] ;
    NSLog(@" 3 %@", initByName->_name) ;
    NSLog(@" 31 %@", initByName.name) ;
    NSLog(@"\n>>>>-----------------test  end ---------------------\n");
}
typedef double (^unary_operation_t)(double);

- (void) test_block: (int) p : (int) p2 {
    unary_operation_t aa ;
    aa = ^(double oo){
        return 0.0;
    } ;
    aa(1.2);
}
@end
